import 'package:flutter/material.dart';
import 'common/router.dart';
import 'pages/home_page.dart';

// ignore: must_be_immutable
class MyApp extends StatefulWidget {
  MyApp([this._navigatorObserver]);

  NavigatorObserver? _navigatorObserver;

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: HomePage(),
      navigatorObservers: <NavigatorObserver>[
        if (widget._navigatorObserver != null) widget._navigatorObserver!,
      ],
      routes: generateRoutes(),
    );
  }
}
